package com.team_project.boot.mapper;

import com.team_project.boot.entity.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductMapper {

    @Select("select id,picurl,content,text,type,title,created from product order by created desc")
    List<Product> selectAll();
    @Insert("insert into product(id,picurl,content,text,type,title) values(null,#{picurl},#{content},#{text},#{type},#{title})")
    void insert(Product product);
}
